<div class="top-fixed">
    <div class="navbar" style="max-width: 640px;margin: auto;">
        <div class="navbar-inner">
            <div class="left">
                <a href="javascript:history.back();" class=""><i class="fa fa-angle-left" style="font-size: 30px;"></i></a>
            </div>
            <div class="center">提现管理</div>
            <div class="right">

            </div>
        </div>
    </div>
</div>
<section class="main" style="max-width: 640px;margin: auto;">
    <div id="status-filter" class="table bgf tc fs14 order_nav">
        <a href="/partner_withdraws?status=all"
           class="table-cell {{#if_eq query.status 'all'}}active{{/if_eq}}">
            <span class="hint-num">全部</span>
        </a>
        <a href="/partner_withdraws?status=Pending"
           class="table-cell {{#if_eq query.status 'Pending'}}active{{/if_eq}}">
            <span class="hint-num">需处理</span>
        </a>
        <a href="/partner_withdraws?status=Successful"
           class="table-cell {{#if_eq query.status 'Successful'}}active{{/if_eq}}">
            <span class="hint-num">成功</span>
        </a>
        <a href="/partner_withdraws?status=Failed"
           class="table-cell {{#if_eq query.status 'Failed'}}active{{/if_eq}}">
            <span class="hint-num">失败</span>
        </a>
    </div>
    <div class="weui_search_bar" id="search_bar">
        <form class="weui_search_outer" id="search_form" method="get" action="/partner_withdraws">
            <div class="weui_search_inner">
                <i class="weui_icon_search"></i>
                <input type="search" class="weui_search_input" id="search_input" name="keyword"
                       placeholder="交易号、姓名、账号、电话搜索"
                       required value="{{query.keyword}}"/>
                <a href="javascript:" class="weui_icon_clear" id="search_clear"></a>
            </div>
            <label for="search_input" class="weui_search_text" id="search_text">
                <i class="weui_icon_search"></i>
                <span>交易号、姓名、账号、电话搜索</span>
            </label>
        </form>
        <a href="javascript:" class="weui_search_cancel" id="search_cancel">取消</a>
    </div>
    <div class="contact_con fs13">
        {{#if rows}}
            <ul class="list-wrapper">
                {{#each rows}}
                    <li class="bb">
                        <dl class="table ptb10">
                            <dt class="table-cell vm w70 plr10">
                                <div class="br50 item-pic">
                                    {{#if user.image}}
                                        <img src="{{user.image}}?imageView2/1/w/150/h/150/q/75" class="imgm">
                                    {{^}}
                                        <img src="images/default-none-head.png" class="imgm">
                                    {{/if}}
                                </div>
                            </dt>
                            <dd class="table-cell vm">
                                <p class="col3 single-line">{{user.nickname}} 「ID:{{user.id}}」「{{level_dict.text}}」</p>
                                <p class="single-line">
                                    订单数:
                                    <a href="/partner_orders?user_id={{user.id}}" class="green">
                                        {{user.order_count}}/{{user.finish_count}}/{{user.sham_count}}
                                    </a>&nbsp;&nbsp;&nbsp;&nbsp;
                                    金额:
                                    <a href="/user_finances?user_id={{user.id}}" class="green">
                                        {{user.amount}}/{{user.frozen}}
                                    </a>
                                </p>
                                <p class="col6 single-line">{{format_datetime created_at}}</p>
                            </dd>
                        </dl>
                        <div class="table index-nav fs12 tc">
                            <a href="javascript:;" class="table-cell  br">
                                <p class="fs18 red bold">
                                    {{total_amount}}
                                </p>
                                <p>金额(元)</p>
                            </a>
                            <a href="javascript:;" class="table-cell  br">
                                <p class="fs18 blue bold">
                                    {{charge}}
                                </p>
                                <p>手续费</p>
                            </a>
                            <a href="javascript:;" class="table-cell  br">
                                <p class="fs18 green bold">
                                    {{amount}}
                                </p>
                                <p>需付</p>
                            </a>
                        </div>
                        <div class="table index-nav fs12 tc pl10">
                            <div class="table-cell tl">
                                <p>账户类型: {{bank_type_dict.text}}</p>
                                <p>账户名称:
                                    <a href="javascript:;" class="clipboard-btn" data-clipboard-text="{{bank_name}}"
                                       style="padding: 0px;">{{bank_name}}</a>
                                </p>
                                <p>账户账号:
                                    <a href="javascript:;" class="clipboard-btn"
                                       data-clipboard-text="{{bank_no}}" style="padding: 0px;">{{bank_no}}</a>
                                </p>
                                <p>手机号:
                                    <a href="javascript:;" class="clipboard-btn"
                                       data-clipboard-text="{{bank_tel}}" style="padding: 0px;">{{bank_tel}}</a>
                                </p>
                            </div>
                            <div class="table-cell tl">
                                <p>ID: {{id}}</p>
                                {{#if note}}<p>备注: {{note}}</p>{{/if}}
                                <p>状态: {{status_dict.text}}</p>
                                <p>时间: {{format_datetime created_at}}</p>
                            </div>
                        </div>
                        {{#if_eq status 'Pending'}}
                            <div class="table partner-opt" data-id="{{id}}">
                                <dd class="table-cell vm p10">
                                    <a href="javascript:;" status="Successful" opt-title="支付成功"
                                       opt-desc="你确定支付成功?"
                                       class="br3 bgf btn-mini btn-mini_outlined">支付成功</a>
                                </dd>
                                <dd class="table-cell vm p10 tr">
                                    <a href="javascript:;" status="Failed" opt-title="取消支付"
                                       opt-desc="你确定取消支付?"
                                       class="mr5 br3 btn-mini btn-mini_black bgf">取消支付</a>
                                </dd>
                            </div>
                        {{/if_eq}}
                        <div class="table">
                            <dd class="table-cell vm p10 tl">
                                <a href="/user_finances?user_id={{user_id}}" class="blue ">查看流水明细</a>
                            </dd>
                            <dd class="table-cell vm p10 tc">
                                <a href="/partner_orders?agency_id={{user_id}}" class="blue ">代理订单明细</a>
                            </dd>
                            <dd class="table-cell vm p10 tr">
                                <a href="/partner_orders?user_id={{user_id}}" class="blue ">用户订单明细</a>
                            </dd>
                        </div>
                    </li>
                {{/each}}
            </ul>

            <div class="loadmore-wrapper loadmore" style="margin: 10px;">
                {{#if loadmore}}
                    <div class="weui-infinite-scroll">
                        <div class="infinite-preloader"></div>
                        正在加载...
                    </div>
                {{/if}}
            </div>
        {{^}}
            <div class="tc nothing">
                <span class="mt10 fs14 col9">提现记录为空</span>
            </div>
        {{/if}}
    </div>
</section>